<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('角色详情')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">

    <form class="form-horizontal m-t" id="jobLogForm" th:if="${name == 'role'}">
        <input id="roleId" name="roleId" type="hidden" th:value="${role.roleId}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">角色名称：</label>
            <div class="form-control-static" th:text="${role.roleName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">角色排序ID：</label>
            <div class="form-control-static" th:text="${role.roleSort}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="form-control-static" th:text="${role.remark}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">菜单权限:</label>
            <div class="col-sm-8">
                <div id="menuTrees" class="ztree form-control-static"></div>
            </div>
        </div>
    </form>
</div>
</body>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">
    $(function() {
        var url = ctx + "cms/sm/menu/roleMenuTreeData?roleId=" + $("#roleId").val();
        var options = {
            id: "menuTrees",
            url: url,
            check: { enable: true },
            expandLevel: 0
        };
        $.tree.init(options);
    });
</script>
</html>
